package com.ruoyi.tb.lmt.service;

import com.ruoyi.tb.lmt.domain.vo.*;
import com.ruoyi.tb.lmt.domain.bo.TbRepairplanlistBo;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.domain.PageQuery;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 计划明细Service接口
 *
 * @author ruoyi
 * @date 2023-12-07
 */
public interface ITbRepairplanlistService {

    /**
     * 查询计划明细
     */
    TbRepairplanlistVo queryById(Long id);

    /**
     * 查询计划明细列表
     */
    TableDataInfo<TbRepairplanlistVo> queryPageList(TbRepairplanlistBo bo, PageQuery pageQuery);

    /**
     * 查询计划明细列表
     */
    List<TbRepairplanlistVo> queryList(TbRepairplanlistBo bo);

    /**
     * 新增计划明细
     */
    Boolean insertByBo(TbRepairplanlistBo bo);

    /**
     * 修改计划明细
     */
    Boolean updateByBo(TbRepairplanlistBo bo);

    /**
     * 校验并批量删除计划明细信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    TableDataInfo<TbRepairplanlistVo> todoList(TbRepairplanlistBo bo, PageQuery pageQuery);

    List<TbRepairplanlistVo> selectStartList(String searchText,String planName,String workGroup);

    List<TbRepairplanlistVo> selectSecondList(String searchText,String planName,String workGroup);

    List<TbRepairplanlistVo> selectOverhaulList(String searchText,String planName,String workGroup);

    List<TbRepairplanlistVo> selectLegacyList(String searchText,String planName,String workGroup);

    List<TbRepairplanlistVo> selectCheckList(String searchText,String planName,String workGroup);

    List<TbRepairplanlistVo> selectApprovalList(String searchText,String planName,String workGroup);

    TableDataInfo<TbRepairplanlistVo> selectLocomotiveList(String lmtType, String lmtNumber, String workerTeam, String planCode, String planName,String repairChar, String repairStartDate, String repairEndDate, PageQuery pageQuery);

    Long selectPlanId(String lmtType, String lmtNumber);

    List<TbRepairplanlistVo> selectMutualList(String searchText);

    List<TbRepairplanlistVo> selectSpecialList(String searchText);

    TbDigitalPlanListVo selectDigitalPlanList(String lmtType, String lmtNumber);

    List<TbRepairplanlistVo> selectAcceptanceList(String searchText);

    TableDataInfo<TbRepairplanlistVo> selectHistoryDetailList(String lmtType, String lmtNumber, PageQuery pageQuery);

    //判断是否定检
    Boolean isTypeById(Long id);

    void export(HttpServletRequest request, HttpServletResponse response);

    Map<String, Object> updateExcel1(MultipartFile file) throws Exception;

    Map<String, Object> updateExcel(MultipartFile file) throws Exception;

    RepairListCountVo selectTwoList(String repairStartDate, String repairEndDate);

    RepairListCountVo selectThreeList(String repairStartDate, String repairEndDate);

    RepairListCountVo selectFourList(String repairStartDate, String repairEndDate);


    List<Map<String, Object>> selectTypeList(String repairType, String startDate, String endDate);

    LocNumberVo selectLmtRepair(String startDate, String endDate);

    boolean isTwoTypeById(Long id);

    TableDataInfo<TbRepairplanlistVo> selectLocomotiveList1(String lmtType, String lmtNumber, String workerTeam, String planCode, String planName, String repairChar, String repairStartDate, String repairEndDate, String status, PageQuery pageQuery);

    Map<String, Object> selectTypeList1();


    List<Long> selectIdsByType(String lmtType,String repairType);

    Map<String, Object> getStats();

    ResponseEntity<byte[]> createWord(TbRepairplanlistVo tbRepairplanlistVo, List<TbLmtrepairWorkdetailVo> list);
}
